Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
' ^ API needed
Private Sub EjectBtn_Click()
mciSendString "set CDAudio door open", t, 127, 0
' ^ open cd rom tray
mciSendString "set CDAudio door closed", t, 127, 0
' ^ close cd rom tray
End Sub
' You can all sorts of fun with this! Just try the FUN.EXE